#pragma once
#include "Common.h"

namespace common {
	class BezierIntersection {
	public:
		BezierIntersection() = default;
		bool CalcBezierIntersection(const BezierCurve& curve_a, const BezierCurve& curve_b, std::vector<Eigen::Vector3f>& intersections, float threshold = 0.001);

	private:
		bool RecursiveCalcIntersection(const BezierCurve& curve_a, const BezierCurve& curve_b);

		std::vector<Eigen::Vector3f> intersections_;
		float threshold_;
	};
}